/*
 *
 * (c) Copyright Ascensio System Limited 2010-2023
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
*/


@import "../../../../skins/default/params.less";

.search-results-block {
    padding: 10px;

    .header-search-results {
        cursor: pointer;
        float: left;
        vertical-align: middle;

        img.logoUrl {
            margin-right: 5px;
        }
    }

    .showAllLink {
        border-bottom: 1px dotted;
        color: @textColor;
        cursor: pointer;
        text-decoration: none;
    }

    .controlButton {
        height: 16px;
        width: 16px;
        line-height: 16px;
        display: inline-block;
        position: relative;
        margin: 0 0 0 3px;

        &:after {
            border-right: 6px solid transparent;
            border-left: 6px solid transparent;
            border-top: 6px solid @textColorBlackDark;
            content: " ";
            height: 0;
            left: 0;
            margin-top: -3px;
            position: absolute;
            right: 0;
            top: 50%;
            width: 0;
        }

        &.closed {

            &:after {
                border-bottom: 6px solid transparent;
                border-left: 6px solid @textColorBlackDark;
                border-top: 6px solid transparent;
                border-right: 0 none;
                left: 3px;
                margin-top: -7px;
            }
        }
    }
}

.search-results {
    margin-bottom: 8px;
    overflow: hidden;

    div.item, div.universalitem {
        border-top: 1px solid @borderColor;
        min-height: 40px;

        a {
            font-weight: bold;
        }

        div.body {
            float: left;
            line-height: 18px;
            padding-top: 3px;
            max-width: 90%;

            a {
                font-weight: bold;
            }
        }

        div.widebody {
            float: left;
            max-width: 885px;
            padding-top: 3px;
            word-wrap: break-word;
        }

        div.date {
            color: #787878;
            float: right;
            line-height: 34px;
        }
    }

    div.item {
        padding: 5px 10px 5px 30px;

        div.centeredContainer {
            position: relative;
            display: block;
            height: inherit;
            text-align: center;

            div.subContainer {
                display: table-cell;
                position: absolute;
                top: 50%;
                width: 100px;
                height: 100%;

                div.body {
                    position: relative;
                    top: -6px;
                    width: 70px;
                    height: 12px;
                    line-height: 12px;
                    font-size: 12px;
                    vertical-align: middle;
                    background-color: Red;
                }
            }
        }
    }

    div.universalitem {
        padding: 5px 10px 5px 10px;
        line-height: 20px;
    }

    div.projItem {
        padding: 5px 10px 5px 10px;
        border-top: 1px solid @borderColor;
        min-height: 40px;
        overflow: hidden;

        div.body {
            float: left;
            line-height: 18px;
            max-width: 885px;
            word-wrap: break-word;

            a {
                font-weight: bold;
            }
        }

        div.date {
            float: right;
            height: inherit;
            vertical-align: middle;
            line-height: 40px;
            color: #787878;
        }

        .itemType .pm-entity-plate-fixed {
            height: 18px;
            line-height: 18px;
            font-size: 12px;
            width: 85px;
            color: white;
            font-weight: bold;
            text-align: center;
            display: inline-block;
        }
    }

    div.universalitem:hover,
    div.projItem:hover {
        background-color: #E6E6E6;

        a {
            text-decoration: underline;
        }
    }

    div.projItem .img,
    div.universalitem .img {
        margin: 3px 10px 0 0;
        width: 75px;
        float: left;
        height: 32px;
        line-height: 32px;
        vertical-align: middle;
        font-weight: bold;
    }
}


.search-result-item {
    height: 50px;

    .left-column {
        padding-right: 24px;
        white-space: nowrap;
    }

    .center-column {
        width: 100%;
    }

    .right-column {
        padding-left: 24px;
        white-space: nowrap;
        text-align: right;
    }

        .left-column div,
        .right-column div {
            max-width: 300px;
            text-overflow: ellipsis;
            overflow: hidden;
        }
}
